package mest.service.cxj.impl;

import mest.VO.cxj.PlanOtherIncomeVO;
import mest.entity.PlanOtherIncome;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

import mest.dao.cxj.PlanOtherIncomeDao;
import mest.service.cxj.PlanOtherIncomeService;

import java.math.BigDecimal;
import java.util.List;

@Service
public class PlanOtherIncomeServiceImpl implements PlanOtherIncomeService {

    @Resource
    private PlanOtherIncomeDao planOtherIncomeDao;

    @Override
    public Integer insertPlanOtherIncome(PlanOtherIncome poi, String theirDb) {
        return planOtherIncomeDao.insertPlanOtherIncome(poi, theirDb);
    }

    @Override
    public List<PlanOtherIncomeVO> selectAllPlanOtherIncome(Integer page, Integer limit, Integer status, String content, String theirDb) {
        return planOtherIncomeDao.selectAllPlanOtherIncome((page - 1) * limit, limit, status, content, theirDb);
    }

    @Override
    public Integer selectCountPlanOtherIncome(Integer status, String content, String theirDb) {
        return planOtherIncomeDao.selectCountPlanOtherIncome(status, content, theirDb);
    }

    @Override
    public Integer changeStatus(Integer id, String theirDb) {
        return planOtherIncomeDao.changeStatus(id, theirDb);
    }

    @Override
    public Integer modifyPlanOtherIncome(PlanOtherIncome poi, String theirDb) {
        return planOtherIncomeDao.modifyPlanOtherIncome(poi, theirDb);
    }

    @Override
    public PlanOtherIncome selectPlanOtherIncomeById(Integer id, String theirDb) {
        return planOtherIncomeDao.selectPlanOtherIncomeById(id, theirDb);
    }

    @Override
    public Integer updatePlanOtherIncomeByMoney(Integer id, BigDecimal hasBennMoney, String theirDb) {
        return planOtherIncomeDao.updatePlanOtherIncomeByMoney(id, hasBennMoney, theirDb);
    }
}
